﻿#ifndef __EDITADDRESSCONTROLLER__
#define __EDITADDRESSCONTROLLER__

#include "BaseKit.h"

class EditAddressController:public CAViewController{
public:
	static EditAddressController* create(unsigned int addressId);
protected:
	EditAddressController(unsigned int addressId);
	virtual ~EditAddressController();
	void viewDidLoad();
	void fillData(const string& data);
	void addressData(const string& data);
	void submitData(const string& data);
private:
	char* url="/api/appAddress";
	unsigned int addressId;
	CATextField* name;
	CATextField* phone;
	unsigned int areaCode=0;
	CATextField* region;
	CATextField* detailedAddress;
	CAPickerView* cityView;
	CAPickerView* countyView;
	CSJson::Value cityDatas;
	CSJson::Value countyDatas;
	unsigned int I=0;
	unsigned int II=0;
};

#endif